home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 65.zip / BS1 part 65 / Math Visin v2.1 disk 1.adf / Arexx.WB / ViewProgram < prev    next >
Text File  |  1992-02-12  |  1KB  |  55 lines

  1. /* ViewProgram     let you view other ARexx programs  6-mar-90 dh
  2.  
  3.   Shift-Click on ViewProgram and on the ARexx program to look at.
  4.  
  5. 1. Click once on ViewProgram
  6. 2. Hold down the <SHIFT> key, and Double-click on an ARexx program icon.
  7.  
  8. ==========================================================================*/
  9.  
  10. OPTIONS PROMPT "---------------------------------------- <RETURN> for more, <Q> to quit: "
  11. ClearLine = d2c(11) Copies(" ",78) d2c(13) d2c(11) d2c(11)
  12. PARSE ARG ProgramName .
  13.  
  14. IF ProgramName = ""
  15. THEN
  16.   DO 
  17.     SAY "This is a utility for viewing ARexx programs.  To use it:"
  18.     SAY ""
  19.     SAY "1. Click once on ViewProgram"
  20.     SAY "2. Hold down the <SHIFT> key, and Double-Click on desired ARexx program."
  21.     SAY ""
  22.     OPTIONS PROMPT "Press <RETURN> to exit: "
  23.     PULL
  24.     EXIT;
  25.   END
  26.  
  27. IF ~OPEN(ProgramFile,ProgramName,'Read')
  28. THEN
  29.   DO 
  30.     SAY "Can't Open File: "ProgramName
  31.     OPTIONS PROMPT "Press <RETURN> to exit: "
  32.     PULL
  33.     EXIT;
  34.   END
  35.  
  36. QuitIt = "F"
  37. linenum = 1
  38.  
  39. DO WHILE ~EOF(ProgramFile) & (QuitIt ~= "T")
  40.   line = READLN(ProgramFile)
  41.   SAY line
  42.   linenum = linenum + 1
  43.   IF (linenum > 18) THEN
  44.   DO
  45.     PULL response
  46.     say ClearLine
  47.     IF (response = 'Q') THEN QuitIt = "T"
  48.     linenum = 1
  49.   END
  50. END
  51.  
  52. OPTIONS PROMPT "-------------------------------------------------------- <RETURN> to quit: "
  53.  
  54. IF linenum>1 THEN PULL Response
  55.